<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<meta http-equiv="content-style-type" content="text/css"/>
<meta http-equiv="content-script-type" content="text/javascript"/>
<meta name="version" content="neblog-1.0"/>
<title>hikerwu</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
</head>
<body>

<div class="right">
    <div>
    <li><div><textarea id="data_in" rows="5">{"id":"n_27912042706779","url":"http:\/\/url.cn\/3QTs0O","timestamp":1342000173}</textarea></div></li>
    <li id="get"><button s="json">json</button><button s="serialize">serialize</button></li>
    <li><div><textarea id="data_out" style="overflow-x:scroll;" wrap="off"></textarea></div></li>
    </div>
</div>
<script type="text/javascript">
$().ready(function(){
    $("#get button").click(function(){
        var data = {};
        data['style'] = $(this).attr('s');
        data['from'] = $("#data_in").val();
        var url = '/?m=Methods&a=convert';
        $.ajax({type: "POST", url: url, data: data, success: function(str){
            var info = "var result=" + str +';';
            try{
                eval(info);
                $("#data_out").val(result['data']);
            } catch(exception) {
                alert(info);
            }
        }});
    });    
});
</script>

</body>
</html>
